package org.calzz.rpc.controller;

/**
 * @author Marek Brodziak <marek.brodziak@gmail.com>
 * @author Piotr Pejas <piotr.pejas@gmail.com>
 * @since Mar 9, 2008
 */
public class JsonParameterDescription {
	private String name;
	private String type;
	private boolean required = true;

	/**
	 * @param name
	 * @param type
	 */
	public JsonParameterDescription(String name, String type) {
		super();
		this.name = name;
		this.type = type;
	}

	/**
	 * A String value that denotes the expected value type for the parameter. If
	 * this member is not supplied or is the Null value then the type is defined
	 * "any".
	 * @return the paramter type
	 */
	public String getType() {
		return type;
	}

	/**
	 * A String value that denotes the expected value type for the parameter. If
	 * this member is not supplied or is the Null value then the type is defined
	 * "any".
	 * @param type the parameter type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * A String value that provides a simple name for parameter.
	 * @return the parameter name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the parameter name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	public boolean isRequired() {
		return required;
	}

	public void setRequired(boolean required) {
		this.required = required;
	}
}
